package com.linxiao.hrcrm.sms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.linxiao.hrcrm.sms.mapper.SmsSendRecordsMapper;
import com.linxiao.hrcrm.sms.domain.SmsSendRecords;
import com.linxiao.hrcrm.sms.service.ISmsSendRecordsService;

/**
 * 短信发送记录Service业务层处理
 * 
 * @author zhoudong
 * @date 2024-07-11
 */
@Service
public class SmsSendRecordsServiceImpl implements ISmsSendRecordsService 
{
    @Autowired
    private SmsSendRecordsMapper smsSendRecordsMapper;

    /**
     * 查询短信发送记录
     * 
     * @param id 短信发送记录主键
     * @return 短信发送记录
     */
    @Override
    public SmsSendRecords selectSmsSendRecordsById(Long id)
    {
        return smsSendRecordsMapper.selectSmsSendRecordsById(id);
    }

    /**
     * 查询短信发送记录列表
     * 
     * @param smsSendRecords 短信发送记录
     * @return 短信发送记录
     */
    @Override
    public List<SmsSendRecords> selectSmsSendRecordsList(SmsSendRecords smsSendRecords)
    {
        return smsSendRecordsMapper.selectSmsSendRecordsList(smsSendRecords);
    }

    /**
     * 新增短信发送记录
     * 
     * @param smsSendRecords 短信发送记录
     * @return 结果
     */
    @Override
    public int insertSmsSendRecords(SmsSendRecords smsSendRecords)
    {
        smsSendRecords.setCreateTime(DateUtils.getNowDate());
        return smsSendRecordsMapper.insertSmsSendRecords(smsSendRecords);
    }

    /**
     * 修改短信发送记录
     * 
     * @param smsSendRecords 短信发送记录
     * @return 结果
     */
    @Override
    public int updateSmsSendRecords(SmsSendRecords smsSendRecords)
    {
        smsSendRecords.setUpdateTime(DateUtils.getNowDate());
        return smsSendRecordsMapper.updateSmsSendRecords(smsSendRecords);
    }

    /**
     * 批量删除短信发送记录
     * 
     * @param ids 需要删除的短信发送记录主键
     * @return 结果
     */
    @Override
    public int deleteSmsSendRecordsByIds(Long[] ids)
    {
        return smsSendRecordsMapper.deleteSmsSendRecordsByIds(ids);
    }

    /**
     * 删除短信发送记录信息
     * 
     * @param id 短信发送记录主键
     * @return 结果
     */
    @Override
    public int deleteSmsSendRecordsById(Long id)
    {
        return smsSendRecordsMapper.deleteSmsSendRecordsById(id);
    }
}
